package com.s20y.register.config.es.repository;

import com.s20y.register.config.es.model.Trip;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.repository.PagingAndSortingRepository;

public interface TripRepository extends
		PagingAndSortingRepository<Trip, Integer> {
	@Query("{\"multi_match\":{\"query\":\"?0\",\"fields\":[\"summary^5\",\"tags\"]}}")
	Page<Trip> findBySummary(String text, Pageable pageable);
}
